﻿using Hospital.IRepository;
using Hospital.IService;
using Hospital.Model.entity;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hospital.Service
{
    public class WardService : BaseService<Ward>, IWardService
    {
        private readonly IWardRepository _iWardRepository;

        public WardService(IWardRepository iWardRepository)
        {
            _iWardRepository = iWardRepository;
            base._iBaseRepository = iWardRepository;
        }
        public async Task<bool> SoftDeletion(int id)
        {
            return await _iWardRepository.EditAsync(columns => columns.IsDeleted == true, a => a.Id == id);
        }
    }
}
